package chpt02;

import java.util.Scanner;

public class LoopDemo07 {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		outerLoop:
		while (true) {
			System.out.println("请输入所要执行功能序号：");
			String command = scanner.nextLine();
			/*
			 * if (command.equals("1")) { // 执行功能1 }else if (command.equals("exit")) {
			 * break; }
			 */
			// 使用switch改写
			switch (command) {
			case "1":
				System.out.println("执行功能1");
				break;
			default:
				break outerLoop;
			}
		}

	}

}
